<?php

/**
 * Usuario form base class.
 *
 * @method Usuario getObject() Returns the current form's model object
 *
 * @package    prode
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseUsuarioForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'id'            => new sfWidgetFormInputHidden(),
      'sf_guard_user' => new sfWidgetFormPropelChoice(array('model' => 'sfGuardUser', 'add_empty' => false)),
      'file_path'     => new sfWidgetFormInputText(),
      'mail'          => new sfWidgetFormInputText(),
      'telefono'      => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'id'            => new sfValidatorPropelChoice(array('model' => 'Usuario', 'column' => 'id', 'required' => false)),
      'sf_guard_user' => new sfValidatorPropelChoice(array('model' => 'sfGuardUser', 'column' => 'id')),
      'file_path'     => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'mail'          => new sfValidatorString(array('max_length' => 255, 'required' => false)),
      'telefono'      => new sfValidatorString(array('max_length' => 255, 'required' => false)),
    ));

    $this->widgetSchema->setNameFormat('usuario[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Usuario';
  }


}
